/*
 * Selling Partner API for Messaging
 * With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package software.amazon.spapi.models.messaging.v1;

import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects;

/**
 * Represents a file that was uploaded to a destination that was created by the Uploads API
 * [&#x60;createUploadDestinationForResource&#x60;](https://developer-docs.amazon.com/sp-api/reference/createuploaddestinationforresource)
 * operation.
 */
@Schema(
        description =
                "Represents a file that was uploaded to a destination that was created by the Uploads API [`createUploadDestinationForResource`](https://developer-docs.amazon.com/sp-api/reference/createuploaddestinationforresource) operation.")
public class Attachment {
    @SerializedName("uploadDestinationId")
    private String uploadDestinationId = null;

    @SerializedName("fileName")
    private String fileName = null;

    public Attachment uploadDestinationId(String uploadDestinationId) {
        this.uploadDestinationId = uploadDestinationId;
        return this;
    }

    /**
     * The identifier for the upload destination. To retrieve this value, call the Uploads API
     * [&#x60;createUploadDestinationForResource&#x60;](https://developer-docs.amazon.com/sp-api/reference/createuploaddestinationforresource)
     * operation.
     *
     * @return uploadDestinationId
     */
    @Schema(
            required = true,
            description =
                    "The identifier for the upload destination. To retrieve this value, call the Uploads API [`createUploadDestinationForResource`](https://developer-docs.amazon.com/sp-api/reference/createuploaddestinationforresource) operation.")
    public String getUploadDestinationId() {
        return uploadDestinationId;
    }

    public void setUploadDestinationId(String uploadDestinationId) {
        this.uploadDestinationId = uploadDestinationId;
    }

    public Attachment fileName(String fileName) {
        this.fileName = fileName;
        return this;
    }

    /**
     * The name of the file, including the extension. This is the file name that will appear in the message. This does
     * not need to match the file name of the file that you uploaded.
     *
     * @return fileName
     */
    @Schema(
            required = true,
            description =
                    "The name of the file, including the extension. This is the file name that will appear in the message. This does not need to match the file name of the file that you uploaded.")
    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Attachment attachment = (Attachment) o;
        return Objects.equals(this.uploadDestinationId, attachment.uploadDestinationId)
                && Objects.equals(this.fileName, attachment.fileName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uploadDestinationId, fileName);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class Attachment {\n");

        sb.append("    uploadDestinationId: ")
                .append(toIndentedString(uploadDestinationId))
                .append("\n");
        sb.append("    fileName: ").append(toIndentedString(fileName)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /** Convert the given object to string with each line indented by 4 spaces (except the first line). */
    private String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }
}
